<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns="http://www.w3.org/1999/xhtml" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:st="http://www.whatisjee.com/ssf/tags" xmlns:rich="http://richfaces.org/rich" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:sf="http://www.whatisjee.com/ssf/functions" template="/common/template/#{param['cb'] eq null ? 'header-content' : 'popup'}.xhtml">
	<ui:param name="title" value="#{messages['login']}"/>
	<ui:define name="content">
		<s:validateAll>
			<h:panelGrid id="pgForm" columns="2" styleClass="form" columnClasses="label,input">
				<st:label for="somLang" required="true" value="#{messages['login.language']}" />
				<h:selectOneMenu id="somLang" value="#{localeSelector.localeString}" onchange="$('fMain:cbChgLang').click()">
					<f:selectItems value="#{localeSelector.supportedLocales}" />
				</h:selectOneMenu>				
				<st:label for="itName" required="true" value="#{messages['user.name']}" />
				<s:decorate>
					<h:inputText id="itName" required="true" value="#{credentials.username}" styleClass="inputtext width50" style="text-transform: uppercase" />
				</s:decorate>
				<st:label for="isPassword" required="true" value="#{messages['user.password']}" />
				<s:decorate>
					<h:inputSecret id="isPassword" required="true" value="#{credentials.password}" styleClass="inputtext width50" />
				</s:decorate>
				<rich:spacer />
				<h:commandButton action="#{identity.login}" value="#{messages['login']}" styleClass="button" />
			</h:panelGrid>
		</s:validateAll>
		<h:commandButton id="cbChgLang" action="#{loginAct.changeLang}" value="INVISIBLE" style="display:none" immediate="true"/>
	</ui:define>
</ui:composition>
